package cn.micro.eye.commons.auth;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

/**
 * Micro Token
 *
 * @author lry
 */
@Data
@Slf4j
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class MicroToken {

    public static final String ACCESS_TOKEN = "access_token";
    public static final String TOKEN_TYPE = "token_type";
    public static final String EXPIRES_IN = "expires_in";
    public static final String REFRESH_TOKEN = "refresh_token";
    public static final String SCOPE = "scope";
    public static final String JTI = "jti";


    @JsonProperty(ACCESS_TOKEN)
    @JSONField(name = ACCESS_TOKEN)
    private String accessToken;

    @JsonProperty(TOKEN_TYPE)
    @JSONField(name = TOKEN_TYPE)
    private String tokenType;

    @JsonProperty(EXPIRES_IN)
    @JSONField(name = EXPIRES_IN)
    private Long expiresIn;

    @JsonProperty(REFRESH_TOKEN)
    @JSONField(name = REFRESH_TOKEN)
    private String refreshToken;

    @JsonProperty(SCOPE)
    @JSONField(name = SCOPE)
    private String scope;

    @JsonProperty(JTI)
    @JSONField(name = JTI)
    private String jti;

}
